import Vue from 'vue'
import App from './App.vue'
import router from './router'
// 引入vuex
import store from './store'

//import axios from 'axios'
//import VueAxios from 'vue-axios'
//Vue.use(VueAxios, axios);

Vue.config.productionTip = false;

// 定义vue的原型变量
import {get, post, patch, put, remove} from './config/http';

Vue.prototype.$post = post;
Vue.prototype.$get = get;
Vue.prototype.$pathc = patch;
Vue.prototype.$put = put;
Vue.prototype.$remove = remove;

Vue.component('phone', () => import('@/components/photo.vue'));
Vue.component('me', () => import('@/components/me.vue'));
Vue.component('search', () => import('@/components/search.vue'));
Vue.component('sort', () => import('@/components/sort.vue'));
Vue.component('recom', () => import('@/components/recommend.vue'));
Vue.component('ueditor', () => import('@/components/ueditor.vue'));
Vue.component('page',() => import('@/components/page.vue'));
Vue.component('login',()=> import('@/components/login.vue'));

// 只使用一些组件
import 'element-ui/lib/theme-chalk/index.css';
import {Button, Pagination, Message, Input,Radio,RadioGroup} from 'element-ui';

Vue.use(Button);
Vue.use(Pagination);
Vue.component(Message.name, Message);
Vue.use(Input);
Vue.use(RadioGroup);
Vue.use(Radio);

new Vue({
    router,
    // 引入vuex
    store,
    render: h => h(App),
}).$mount('#app');
